<h2>My Heroes</h2>
<ul class="heroes">
    <li [class.selected]="hero === selectedHero" (click)="onSelect(hero)" *ngFor="let hero of heroes; trackBy: trackByHeroes; let i = index">
        <span class="badge">{{hero.id}}</span>
        <span>{{hero.name}} ({{i + 1}})</span>
        <button class="delete" (click)="delete(hero); $event.stopPropagation()">x</button>
    </li>
</ul>
<div *ngIf="selectedHero">
    <h2>
        {{selectedHero.name | uppercase}} is my hero
    </h2>
    <button (click)="gotoDetail(selectedHero.id)">View Details</button>

    <!--FOR EVENT TESTING-->
    <!--<hero-detail (deleteRequest)="onDeleteRequest($event)" [hero]="selectedHero"></hero-detail>-->

    <!--FOR ngOnChanges TESTING-->
    <!--<hero-form [title]="abc"></hero-form>-->
</div>
<div>
    <label>Hero name:</label>
    <input #heroName />
    <button (click)="add(heroName.value); heroName.value=''">Add</button>
</div>